package jzh.cloud.user.listener;

import jzh.cloud.user.service.UserService;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@RocketMQMessageListener(topic = "pineapple-user", consumerGroup = "pineapple_consumer_group")
public class UserMsgListener implements RocketMQListener<String> {

    @Resource
    private UserService userService;

    @Override
    public void onMessage(String s) {
        System.out.println("canal" + s);
    }
}
